// agent-ui/src/api/comment/commentApi.js

import axios from 'axios';

const commentApi = {
    // 获取用户的所有评论
    getUserComments(userId) {
        return axios.get(`http://localhost:9527/comments/user/${userId}`);
    },

    // 删除评论
    deleteComment(commentId) {
        return axios.delete(`http://localhost:9527/comments/${commentId}`);
    },

    // 添加评论
    addComment(comment) {
        return axios.post('http://localhost:9527/comments', comment);
    }
};

export default commentApi; 